package com.upcode.weighing.detect.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.upcode.weighing.detect.service.OverBlacklistService;
import com.upcode.weighing.domain.DetectPoint;
import com.upcode.weighing.domain.OverBlacklist;
import com.upcode.weighing.mapper.OverBlacklistMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.upcode.weighing.vo.req.DetectPointQueryParam;
import com.upcode.weighing.vo.req.OverBlacklistQueryParam;
import com.upcode.weighing.vo.req.PageReqVo;
import com.upcode.weighing.vo.resp.OverBlacklistRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author alex
 * @since 2024-07-21
 */
@Service
public class OverBlacklistServiceImpl extends ServiceImpl<OverBlacklistMapper, OverBlacklist> implements OverBlacklistService {
    @Autowired
    private OverBlacklistMapper overBlacklistMapper;
    @Override
    public IPage<OverBlacklistRespVo> queryPageList(PageReqVo<OverBlacklistQueryParam> vo) {
        long currentPage = vo.getPage().getCurrentPage();
        long pageSize = vo.getPage().getPageSize();
        Page page = new Page(currentPage, pageSize);
        IPage<OverBlacklistRespVo> iPage = overBlacklistMapper.selectPageList(page, vo.getParams());
        return iPage;
    }
}
